package com.cs.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.ArrayList;

@Data
@TableName("order_info")
public class Order {
    private Integer id;
    private String orderId;  //订单ID
    private Double discount; //折扣
//    @TableField(exist = false)
//    private ArrayList goodsId; //购买的商品
    @TableField(exist = false)
    private ArrayList<Goods> goods;
    private Double totalPrice;  //总价
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp createTime; //创建时间
    private String phone;  //手机号
    private Double payMoney; //应付金额
    private Double saveMoney; //已优惠金额
    private Integer status; //订单状态
    private String receiverName; //收货人姓名
    private String receiverPhone; //收货人电话
    private String receiverAddress; //收货地址
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp paymentTime; //付款时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp receiveTime; //确认收货时间
}
